package com.navinfo.tripanalysis.offline.service.impl;

import com.navinfo.tripanalysis.common.arithmetic.common.OuterEventData;
import com.navinfo.tripanalysis.offline.service.LoadTripEventService;
import com.navinfo.tripanalysis.offline.service.TripEventConvertService;
import org.apache.spark.sql.Row;

/**
 * ETL从hive加载行程事件数据
 * @author 沈东生，web
 */
public class LoadTripEventServiceImpl extends AbstractLoadTripDataService<OuterEventData> implements LoadTripEventService {
    private TripEventConvertService convertService;

    public LoadTripEventServiceImpl(TripEventConvertService convertService) {
        this.convertService = convertService;
    }

    @Override
    protected OuterEventData fromRow(Row row) {
        return convertService.fromRow(row);
    }
}
